<?php
class DBConnection {

	private $dbConnection;
	
  	static function connect($config_path) {	  
  		$config = load_properties($config_path);
	  	$dbConnection = mysql_connect($config["server"], $config["user"], $config["password"]) or die("Nelze se spojit s databází");
		mysql_select_db($config["database"]);
		mysql_query("SET NAMES 'utf8'");
		mysql_query("SET lc_time_names = 'cs_CZ'");
  	}
  	
  	static function disconnect() {
  		mysql_close($dbConnection);
  	}
  	
  	
}
?>